const getters = {
  // 获取侧边栏状态
  sidebar: state => state.app.sidebar,
  // 获取设备类型（desktop/mobile）
  device: state => state.app.device,
  // 获取当前登录用户的ID
  userId: state => state.user.userInfo.userId,
  // 获取用户token，用于接口访问认证
  token: state => state.user.token,
  // 获取用户头像地址
  avatar: state => state.user.userInfo.staffPhoto,
  // 获取用户名
  name: state => state.user.userInfo.username,
  routes: state => state.user.routes // 动态路由
}
export default getters
